home *** CD-ROM | disk | FTP | other *** search
/ Risc World 5 / Risc World 5.iso / SOFTWARE / Issue5 / PD / DIRSYNC / LegalStuff / ccres / c / _PrintDbox < prev    next >
Text File  |  2004-03-20  |  4KB  |  68 lines

  1. /* _PrintDbox.c
  2.    $Id: _PrintDbox.c,v 1.2 2004/03/20 22:13:59 joty Exp $
  3.  
  4.    Copyright (c) 2003-2004 Dave Appleby / John Tytgat
  5.  
  6.    This file is part of CCres.
  7.  
  8.    CCres is free software; you can redistribute it and/or modify
  9.    it under the terms of the GNU General Public License as published by
  10.    the Free Software Foundation; either version 2 of the License, or
  11.    (at your option) any later version.
  12.  
  13.    CCres is distributed in the hope that it will be useful,
  14.    but WITHOUT ANY WARRANTY; without even the implied warranty of
  15.    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  16.    GNU General Public License for more details.
  17.  
  18.    You should have received a copy of the GNU General Public License
  19.    along with CCres; if not, write to the Free Software
  20.    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  21.  */
  22.  
  23. #include "ccres.h"
  24.  
  25. #include <stdio.h>
  26.  
  27. #include <OSLib/printdbox.h>
  28.  
  29.  
  30. static FLAGS PrintDboxFlags[] = {
  31.     {printdbox_GENERATE_ABOUT_TO_BE_SHOWN , "printdbox_GENERATE_ABOUT_TO_BE_SHOWN" },
  32.     {printdbox_GENERATE_DIALOGUE_COMPLETED, "printdbox_GENERATE_DIALOGUE_COMPLETED"},
  33.     {printdbox_GENERATE_SHOW_SETUP_ACTION , "printdbox_GENERATE_SHOW_SETUP_ACTION" },
  34.     {printdbox_INCLUDE_ALL_FROM_TO        , "printdbox_INCLUDE_ALL_FROM_TO"        },
  35.     {printdbox_INCLUDE_COPIES             , "printdbox_INCLUDE_COPIES"             },
  36.     {printdbox_INCLUDE_SCALE              , "printdbox_INCLUDE_SCALE"              },
  37.     {printdbox_INCLUDE_ORIENTATION        , "printdbox_INCLUDE_ORIENTATION"        },
  38.     {printdbox_INCLUDE_SAVE               , "printdbox_INCLUDE_SAVE"               },
  39.     {printdbox_INCLUDE_SET_UP             , "printdbox_INCLUDE_SET_UP"             },
  40.     {printdbox_INCLUDE_DRAFT              , "printdbox_INCLUDE_DRAFT"              },
  41.     {printdbox_SELECT_FROM_TO             , "printdbox_SELECT_FROM_TO"             },
  42.     {printdbox_SELECT_SIDEWAYS            , "printdbox_SELECT_SIDEWAYS"            },
  43.     {printdbox_SELECT_DRAFT               , "printdbox_SELECT_DRAFT"               }
  44. };
  45.  
  46. static OBJECTLIST PrintDboxObjectList[] = {
  47.     {iol_FLAGS,   "printdbox_flags:",         offsetof(printdbox_object, flags),                   PrintDboxFlags, ELEMENTS(PrintDboxFlags)},
  48.     {iol_INT,     "from:",                    offsetof(printdbox_object, from),                    NULL,           0                       },
  49.     {iol_INT,     "to:",                      offsetof(printdbox_object, to),                      NULL,           0                       },
  50.     {iol_INT,     "copies:",                  offsetof(printdbox_object, copies),                  NULL,           0                       },
  51.     {iol_INT,     "scale:",                   offsetof(printdbox_object, scale),                   NULL,           0                       },
  52.     {iol_STRING,  "further_options:",         offsetof(printdbox_object, further_options),         NULL,           0                       },
  53.     {iol_STRING,  "alternative_window_name:", offsetof(printdbox_object, alternative_window_name), NULL,           0                       }
  54. };
  55.  
  56. int _printdbox(PDATA data, PSTR pszIn, toolbox_relocatable_object_base * object)
  57. {
  58.     put_objects(data, pszIn, 0, (PSTR) (object + 1), PrintDboxObjectList, ELEMENTS(PrintDboxObjectList));
  59.  
  60.     return(sizeof(printdbox_object));
  61. }
  62.  
  63.  
  64. void printdbox(FILE * hf, toolbox_resource_file_object_base * object, PSTR pszStringTable, PSTR pszMessageTable)
  65. {
  66.     get_objects(hf, pszStringTable, pszMessageTable, (PSTR) (object + 1), PrintDboxObjectList, ELEMENTS(PrintDboxObjectList), 1);
  67. }
  68.